<template>
  <el-card class="app-container">
    <c-u-r-d-table :option="option"/>
  </el-card>
</template>

<script>

import ColumnType from '@/framework/constant/ColumnType'
import ApplyTypeEnum from '@/feature/oms/infra/constants/ApplyTypeEnum'
import OnlineStatusEnum from '@/framework/constant/OnlineStatusEnum'
import { afterSaleApplyApi } from '@/feature/oms/infra/api/afterSaleApplyApi'
import CURDTable from '@/framework/components/table/CURDTable'

export default {
  components: { CURDTable },
  data() {
    return {
      option: {
        requestApi: afterSaleApplyApi,
        columns: [
          {
            label: '申请编号',
            prop: 'applyNo'
          },
          {
            label: '用户ID',
            prop: 'userId',
            searchable: true,
            type: ColumnType.SELECT
          },
          {
            label: '商户ID',
            prop: 'merchantId',
            searchable: true,
            type: ColumnType.SELECT
          },
          {
            label: '',
            prop: 'orderItemId',
            type: ColumnType.SELECT
          },
          {
            label: '申请类型',
            prop: 'applyType',
            type: ColumnType.RADIO,
            options: ApplyTypeEnum
          },
          {
            label: '申请原因',
            prop: 'applyReason'
          },
          {
            label: '状态',
            searchable: true,
            type: ColumnType.RADIO,
            hiddenInForm: true,
            options: OnlineStatusEnum,
            prop: 'status'
          },
          {
            label: '申请备注',
            prop: 'applyRemark'
          },
          {
            label: '物流公司编号',
            prop: 'expressComNo'
          },
          {
            label: '物流公司',
            prop: 'expressCom'
          },
          {
            label: '物流编号',
            prop: 'expressNo'
          },
          {
            label: '申请退款金额',
            prop: 'applyAmount'
          },
          {
            label: '创建时间',
            type: ColumnType.DATETIME,
            hiddenInForm: true,
            prop: 'gmtCreate'
          },
          {
            label: '修改时间',
            type: ColumnType.DATETIME,
            hiddenInForm: true,
            prop: 'gmtModified'
          },
          {
            label: '商家备注',
            prop: 'merchantRemark'
          },
          {
            label: '申请数量',
            prop: 'applyNum',
            type: ColumnType.NUMBER
          },
          {
            label: '图片',
            prop: 'applyImgList'
          }
        ]
      }
    }
  },
  methods: {}
}
</script>

